# -*- coding: utf-8 -*-
# @Author : zhangxuchuo
# @Date   : 2021/8/12
# @File   : Inter54_EntStatusAbnormal_FL.py
# @E-mail : wangbaoshan@bbdservice.com

'''eof
name:申请企业行内账户状态异常
code:Inter54_EntStatusAbnormal_FL
tableName:
columnName:
groups:企业通用模块
dependencies:COMPANY_OVERVIEW_TAG
type:常用指标
datasourceType:在线指标
description:
eof'''

import sys
import pandas as pd
import json
from datetime import datetime
#从风铃-图谱中取得数据
null_type_list = ['', ' ', None, 'null', 'Null', 'NULL', '/', '-', '--', []]

def Inter54_EntStatusAbnormal():
    # data = IC_DSJ_2D.get('data')
    try:
        is_inner = COMPANY_OVERVIEW_TAG.get('is_inner', '')
        account_status_abnormal = COMPANY_OVERVIEW_TAG.get('account_status_abnormal', '')
        if is_inner not in null_type_list and account_status_abnormal not in null_type_list:
            if is_inner == 'true' and account_status_abnormal == 'true':
                return 1
            else:
                return '缺失值'
        else:
            return '缺失值'
    except:
        return '缺失值'

result = Inter54_EntStatusAbnormal()